package com.dcd.service;

import com.dcd.pojo.Brand;
import com.dcd.service.impl.BrandServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(name = "donchedi-provider9091", fallback = BrandServiceImpl.class, contextId = "brand")
public interface BrandService {

    /**
     * 查询前32个热门品牌/根据指定首写字母查询
     *
     * @return
     */
    @RequestMapping("/select_popularity_brand")
    List<Brand> select_popularity_brand(@RequestParam String brand_first_letter, @RequestParam String whether_only_on_sale);

    /**
     * 查询指定品牌信息
     *
     * @param brand_id
     * @return
     */
    @RequestMapping("/select_brand_mess_by_id")
    Brand select_brand_mess_by_id(@RequestParam int brand_id);

    /**
     * 查询所有品牌(购车计算)
     * @return
     */
    @RequestMapping("/select_brandAll")
    public List<Brand> select_brandAll();


}
